﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.Composition;
using System.ComponentModel.Composition.Hosting;
using System.ComponentModel.Composition.Primitives;

namespace CompositionPlugin
{
    public class ContractMetadata
    {
        public ContractMetadata(string name)
            : this(name, null, CreationPolicy.Any, ImportCardinality.ExactlyOne)
        {
        }

        public ContractMetadata(Type type)
            : this(null, type, CreationPolicy.Any, ImportCardinality.ExactlyOne)
        {
        }

        public ContractMetadata(string name, Type type)
            : this(name, type, CreationPolicy.Any, ImportCardinality.ExactlyOne)
        {
        }

        public ContractMetadata(string name, Type type, CreationPolicy policy, ImportCardinality cardinality)
        {
            this.Name = name;
            this.Type = type;
            this.CreationPolicy = policy;
            this.Cardinality = cardinality;
        }

        public string Name { get; private set; }

        public Type Type { get; private set; }

        public CreationPolicy CreationPolicy { get; private set; }

        public ImportCardinality Cardinality { get; private set; }
    }
}
